var curData;
var MOVIE_TIME_PATH = "/usr/data/movie_time";
var seekPlayTime = 0;
var playTimeObj = false;
function init(){
	document.cachePage = false;
	var json = getSession("MOVIE_PLAY_JSON");
	eval("curData="+json); 
	curData.curUrlId = 1;
	
	
	var con = mSTB.getFileContent(MOVIE_TIME_PATH);
	if(con){
		eval("playTimeObj = "+con);
	}else{
		playTimeObj = new Object();
	}
	
	play(curData);
}

function unloadPage(){
	if(player){	//停止播放器
		
		var playerState = player.getPlayerState();
		var cur = player.getCurTime ();
		if(playerState > 0 && cur > 0){
			cur =  parseInt(cur/1000)
			if(cur > 3){
				cur = cur - 3;
			}
			playTimeObj[curData.id+'-'+curData.curUrlId] = cur;
			mSTB.setFileContent(MOVIE_TIME_PATH,playTimeObj.toJSON())
		}
		player.stopPlay();				
	}	
	$.setConfigValue("display_brightness",myPlayer.contralMap.brightness.val+"");
	$.setConfigValue("display_contrast",myPlayer.contralMap.contrast.val+"");
}

function playEnd(){
	history.go(-1);
}
